<?php

namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class WorkOrderDispatch extends Model
{
	
    protected $table = 'work_order_dispatchs';

    protected $dates = ['actual_start_at', 'actual_end_at', 'expect_end_at'];

    protected $fillable = [
        'work_order_id',
        'processes_archives_id',
        'processes_archives_title',
        'user_id',
        'user_name',
        'repair_status',
        'actual_start_at',
        'actual_end_at',
        'expect_end_at'
    ];

    public function processesArchives()
    {
        return $this->belongsTo(ProcessesArchive::class);
    }

    public function workOrder()
    {
        return $this->belongsTo(WorkOrder::class);
    }
}
